package hu.u_szeged.inf.ovrt.filelister.core.utils;

import java.io.File;
import java.util.ListIterator;

/**
 * Iterator class for a File Array.
 *
 * @author Homoya András
 *
 */
public final class FileIterator implements ListIterator<File> {
    private final ListIterator<File> fileIterators;
    /**
     * Constructor.
     */
    public FileIterator(ListIterator<File> listIterator) {
        fileIterators = listIterator;
    }

    @Override
    public boolean hasNext() {
        return fileIterators.hasNext();
    }

    @Override
    public void remove() {
        fileIterators.remove();
    }

    @Override
    public void add(File e) {
        fileIterators.add(e);
    }

    @Override
    public boolean hasPrevious() {
        return fileIterators.hasPrevious();
    }

    @Override
    public int nextIndex() {
        return fileIterators.nextIndex();
    }

    @Override
    public File previous() {
        return fileIterators.previous();
    }

    @Override
    public int previousIndex() {
        return fileIterators.previousIndex();
    }

    @Override
    public void set(File e) {
        fileIterators.set(e);
    }

    @Override
    public File next() {
        return fileIterators.next();
    }

}
